Don't run "Publish Tester Build" workflow on tag push #780
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The "Publish Tester Build" workflow is triggered by the
pushevent. This event occurs on tag pushes in addition to commit pushes.On a tag push, there is an ambiguity in how the build should be identified, since the revision has two Git refs:
The build system intentionally uses the tag name ref to name the build archives, but the workflow's checksum file generation code expects the files to be named using the commit hash ref. This resulted in a spurious failure of the "Create checksum file" step of the
checksumsjob with an error of the form:The ref selection behavior of the checksum generation code could be corrected. However, there is no point in generating a tester build on tag push, since a tester build will have already been generated for that revision previously via the commit push, and any necessary validation already performed prior to the tag push. The "Release" workflow is triggered by the tag push so builds are produced for that revision regardless. For this reason, the correct resolution for this bus is to prevent the production of a tester build when the workflow is triggered by the tag push.
To fix this issue, the
run-determinationjob is configured to check for the presence of a tag by comparinggithub.refagainst a regular expression (defined via theTAG_REGEXshell environment variable). If there is a match, the other jobs are skipped, preventing the workflow from failing at later stages.